﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SimpleFactory
{
    public class ClusteringFactory
    {
        public static IClustering CreateClustering(string clusteringType)
        {
            switch (clusteringType.ToLower())
            {
                case "kmeans":
                    return new KmeansClustering();
                case "dbscan":
                    return new DbscanClustering();
                case "hierarchical":
                    return new HierarchicalClustering();
                default:
                    throw new ArgumentException($"不支持的聚类算法类型: {clusteringType}");
            }
        }
    }
}
